home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-2.iso / os2 / pmremd10.zip / install.cmd next >
OS/2 REXX Batch file  |  1996-01-11  |  2KB  |  51 lines

  1. /* Installation script for PMRemind */
  2.  
  3. call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  4. call SysLoadFuncs
  5. '@echo off'
  6. say 'Is the current drive/directory the destination (Y/n)?'
  7. pull ans .
  8.  
  9. if SUBSTR(ans,1,1)='N' then do
  10.     source=directory()
  11.     say 'Please enter the destination drive and directory'
  12.     say 'The directory will be made if it does not exist'
  13.     pull dest 
  14.     ans=SysMkDir(dest)
  15.     if \(ans=0 | ans=5) then do
  16.             say 'Directory could not be created.  Please verify the drive and path.'
  17.             EXIT
  18.     end
  19.     say 'Copying Files...Please Wait'
  20.     copy source'\*.*' dest'>nul'
  21.     if substr(dest,2,1)=':' then do
  22.         'cd 'substr(source,1,2)'\'
  23.         substr(dest,1,1)':'
  24.     end  /* Do */
  25.         
  26.     cd dest'>nul'       
  27.     say 'Do you want me to delete and remove 'source' (N/y)?'
  28.     pull ans
  29.     if substr(ans,1,1)='Y' then do
  30.         "cmd /c del "source"\*.* /n"
  31.         rd source
  32.     end  /* Do */
  33. end  /* Do */
  34.  
  35. dest=directory()
  36. say 'Would you like PMRemind in the S)tartup folder or the D)esktop (D/s)?'
  37. pull ans .
  38. if substr(ans,1,1)='S' then
  39.     ans='<WP_START>'
  40. else
  41.     ans='<WP_DESKTOP>'
  42.  
  43. say 'Please enter your name for your datafile.  (Default is pmremind.rem)'
  44. pull datafile .
  45. if datafile='' then datafile='pmremind.dat'
  46.  
  47. if SysCreateObject("WPProgram", "PMRemind", ans,"EXENAME="dest"\PMREMIND.EXE;PARAMETERS="datafile";startupdir="dest,R)
  48.     THEN say 'Object created ok'
  49. else
  50.         say 'Failed to create object'
  51.